package com.ae.base.client.event;

import com.ae.api.IPlaced;
import com.ae.base.ModConstant;
import com.ae.base.PlacedRegister;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.client.event.ModelBakeEvent;
import net.minecraftforge.client.model.ModelLoader;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod;

import java.util.HashMap;

@Mod.EventBusSubscriber(modid = ModConstant.MOD_ID, bus = Mod.EventBusSubscriber.Bus.MOD, value = Dist.CLIENT)
public class ModelBake {
    @SubscribeEvent
    public static void modelBake(ModelBakeEvent event) {
        //TODO 可能需要将模型的注册移动到该位置
        for (IPlaced value : PlacedRegister.placedMap.values()) {
            event.getModelRegistry().putAll(value.modelBake());
        }
    }
}
